package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.mapper.PrizeDrawResultMapper;
import com.sc.nft.entity.PrizeDrawResult;
import com.sc.nft.service.PrizeDrawResultService;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * (PrizeDrawResult)表Dao层
 *
 * @author 王伟成
 * @since 2023-09-12 14:55:46
 */
@Slf4j
@Repository
public class PrizeDrawResultDao extends ServiceImpl<PrizeDrawResultMapper, PrizeDrawResult> {


    public PrizeDrawResult getByLotteryDrawNumAndLotteryDrawTime(String lotteryDrawNum, String lotteryDrawTime) {
        LambdaQueryWrapper<PrizeDrawResult>lambdaQueryWrapper= Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(PrizeDrawResult::getLotteryDrawTime,lotteryDrawTime);
        lambdaQueryWrapper.eq(PrizeDrawResult::getLotteryDrawNum,lotteryDrawNum);
        return getOne(lambdaQueryWrapper);
    }
}
